package me.a_littlesquid.origin.items;


import org.bukkit.Material;
import org.bukkit.attribute.AttributeModifier;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;



import static org.bukkit.attribute.Attribute.GENERIC_ATTACK_DAMAGE;
import static org.bukkit.attribute.AttributeModifier.Operation.ADD_NUMBER;

public class ck {
    public static ItemStack getsword(){
        AttributeModifier attributeModifier=new AttributeModifier("generic.attack_damage",8,ADD_NUMBER);
        ItemStack sword=new ItemStack(Material.DIAMOND_SWORD);
        ItemMeta meta= sword.getItemMeta();
        meta.addAttributeModifier(GENERIC_ATTACK_DAMAGE,attributeModifier);
        meta.setDisplayName("长剑");
        meta.setUnbreakable(true);
        sword.setItemMeta(meta);
        return sword;
    }
}
